//
//  VCWebViewController.m
//  NBTripe
//
//  Created by 陈曦 on 16/1/13.
//  Copyright © 2016年 Vicki. All rights reserved.
//

#import "VCWebViewController.h"
@interface VCWebViewController ()<UIWebViewDelegate>

@end

@implementation VCWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.userInteractionEnabled = YES;
    UIWebView *web = [ [UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height - 108*XHIGHT)];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.url]];
    [web loadRequest:request];
    web.userInteractionEnabled = YES;
    [self.view addSubview:web];
    // Do any additional setup after loading the view.
}

- (void)webViewDidFinishLoad:(UIWebView *)webView
{
    NSLog(@"%@" , webView);
}

//- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
//    
//    if (navigationAction.navigationType==WKNavigationTypeBackForward) {                  //判断是返回类型
//        if (webView.backForwardList.backList.count>0) {                                  //得到栈里面的list
//            WKBackForwardListItem * item = webView.backForwardList.currentItem;          //得到现在加载的list
//            if (item == webView.backForwardList.backList.firstObject) {
//                [self.navigationController popViewControllerAnimated:YES];
//            }
//        }
//    }
//    
//   
//}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
